-- =========================================
-- Author: Jacob Gable
-- Created: 02.00.2009
-- Notes: Creation of GoalEntry table.
-- 
-- 
-- =========================================

IF OBJECT_ID('dbo.GoalEntry', 'U') IS NOT NULL
  DROP TABLE dbo.GoalEntry
GO

CREATE TABLE dbo.GoalEntry
(
	EntryId int identity(1,1) NOT NULL, 
	GoalId int foreign key references FitnessGoal(GoalId)
				NOT NULL,
	CreatedDate datetime NOT NULL, 
	[Value] decimal NOT NULL,	
	ts timestamp NULL,
    CONSTRAINT PK_GoalEntry PRIMARY KEY (EntryId)
)
GO
